/*
 * Open LiveReplay Server - Live replay server for Supreme Commander
 * 
 * Copyright (C) 2009, 2009 Open LiveReplay Server Project
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details:
 * http://www.gnu.org/copyleft/lesser.html#TOC3
 */
package net.galacticwar.replayserver;

/**
 * Represents the player informations inside a {@code Replay}
 * 
 * @author Yoann Meste (aka Mancer)
 *
 */
public class Player {
	private String name;
	private Float faction;
	private Float team;
	private Float color;
	
	public Player(String name, Float faction,  Float team,  Float color) {
		this.name = name;
		this.faction = faction;
		this.team = team;
		this.color = color;
	}

	public String getName() {
		return name;
	}

	public String getFaction() {
		if (faction.equals(1f)) {
			return "UEF";
		}
		else if (faction.equals(2f)) {
			return "AEON";
		}
		else if (faction.equals(3f)) {
			return "CYBRAN";
		}
		else if (faction.equals(4f)) {
			return "SERAPHIM";
		}
		
		return "Random";
	}
	
	public Float getTeam() {
		return team;
	}
	
	public Float getColor() {
		return color;
	}
	
}
